/*
 Navicat Premium Dump SQL

 Source Server         : localhost_3306
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : localhost:3306
 Source Schema         : super

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 20/11/2025 14:46:46
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL COMMENT '配置名称',
  `s_key` varchar(64) NOT NULL COMMENT '配置键名',
  `s_value` varchar(100) NOT NULL COMMENT '配置键值',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '系统内置 1=是 0=否',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_time` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人ID',
  `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人ID',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='系统配置';

-- ----------------------------
-- Records of sys_config
-- ----------------------------
BEGIN;
INSERT INTO `sys_config` (`id`, `name`, `s_key`, `s_value`, `status`, `remark`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`) VALUES (1, '文件服务器地址', 'FileUrl', 'http://localhost:8080/static', 0, '文件访问地址', 1760941901630, 3, 1762757983001, 2, 0);
INSERT INTO `sys_config` (`id`, `name`, `s_key`, `s_value`, `status`, `remark`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`) VALUES (2, '测试', 'test', '1', 0, NULL, 1762755861002, 2, 1762755861002, 2, 1);
INSERT INTO `sys_config` (`id`, `name`, `s_key`, `s_value`, `status`, `remark`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`) VALUES (3, 'IP的QPS限流', 'IP_QPS_LIMIT', '10', 1, 'IP每秒最多请求10 次', 1762758493002, 2, 1763369730001, 2, 0);
INSERT INTO `sys_config` (`id`, `name`, `s_key`, `s_value`, `status`, `remark`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`) VALUES (4, '显示水印', 'ShowWatermark', '0', 0, '是否显示水印 1=是 0=否', 1763368876006, 2, 1763369003002, 2, 0);
INSERT INTO `sys_config` (`id`, `name`, `s_key`, `s_value`, `status`, `remark`, `create_time`, `create_by`, `update_time`, `update_by`, `is_deleted`) VALUES (5, '后台名称', 'AdminName', 'Super Admin', 0, '后台显示名称', 1763369076002, 2, 1763369751002, 2, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(100) DEFAULT NULL COMMENT '登录人账号',
  `func` varchar(64) NOT NULL COMMENT '调用方法',
  `request_method` varchar(64) NOT NULL DEFAULT '' COMMENT '请求方式',
  `request_params` text COMMENT '请求参数',
  `response_content` mediumtext COMMENT '返回参数',
  `content` varchar(255) NOT NULL COMMENT '日志内容',
  `error_content` text COMMENT '异常信息',
  `request_uri` varchar(255) DEFAULT NULL COMMENT '请求路径',
  `ip` varchar(45) DEFAULT NULL COMMENT 'IP地址',
  `exec_time` bigint(20) DEFAULT NULL COMMENT '执行时间(ms)',
  `browser` varchar(100) DEFAULT NULL COMMENT '浏览器',
  `browser_version` varchar(100) DEFAULT NULL COMMENT '浏览器版本',
  `os` varchar(100) DEFAULT NULL COMMENT '终端系统',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1正常 0异常',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_create_time` (`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8432 DEFAULT CHARSET=utf8mb4 COMMENT='系统日志';

-- ----------------------------
-- Records of sys_log
-- ----------------------------
BEGIN;
INSERT INTO `sys_log` (`id`, `username`, `func`, `request_method`, `request_params`, `response_content`, `content`, `error_content`, `request_uri`, `ip`, `exec_time`, `browser`, `browser_version`, `os`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (8430, NULL, 'getSystemTime', 'GET', '', NULL, '获取系统时间', NULL, '/system/time', '127.0.0.1', 0, 'Chrome', '142.0.0.0', 'OSX', 1, NULL, 1763621137005, NULL, NULL, 0);
INSERT INTO `sys_log` (`id`, `username`, `func`, `request_method`, `request_params`, `response_content`, `content`, `error_content`, `request_uri`, `ip`, `exec_time`, `browser`, `browser_version`, `os`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (8431, NULL, 'getSystemTime', 'GET', '', NULL, '获取系统时间', NULL, '/system/time', '127.0.0.1', 0, 'Chrome', '142.0.0.0', 'OSX', 1, NULL, 1763621197000, NULL, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `pid` bigint(20) DEFAULT NULL COMMENT '父编号',
  `tree_path` varchar(255) DEFAULT NULL COMMENT '树目录',
  `username` varchar(64) NOT NULL COMMENT '用户名',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `nickname` varchar(100) DEFAULT NULL COMMENT '昵称',
  `gender` tinyint(1) DEFAULT '0' COMMENT '性别(1-男 2-女 0-保密)',
  `email` varchar(64) DEFAULT NULL COMMENT '邮箱',
  `phone` varchar(32) DEFAULT NULL COMMENT '手机号',
  `bio` varchar(255) DEFAULT NULL COMMENT '个人简介',
  `roles` varchar(255) NOT NULL COMMENT '角色',
  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  `dept_tree_path` varchar(255) DEFAULT NULL COMMENT '部门树',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(1-正常 0-停用)',
  `login_time` bigint(20) DEFAULT NULL COMMENT '登录时间',
  `login_ip` varchar(100) DEFAULT NULL COMMENT '登录IP',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` bigint(20) DEFAULT NULL COMMENT '创建时间',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='系统用户';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` (`id`, `pid`, `tree_path`, `username`, `password`, `avatar`, `nickname`, `gender`, `email`, `phone`, `bio`, `roles`, `dept_id`, `dept_tree_path`, `status`, `login_time`, `login_ip`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (1, 0, '0,', 'super', '$2a$10$hjLgv7wngw8Ft.GMTxptgODjZYEWbJfAxH.MV6zX2tgww5gCQWMj6', NULL, '超管', 0, 'super@admin.com', '18888888888', NULL, 'root', 1, '0,', 1, NULL, NULL, NULL, 1759184154307, NULL, NULL, 1);
INSERT INTO `sys_user` (`id`, `pid`, `tree_path`, `username`, `password`, `avatar`, `nickname`, `gender`, `email`, `phone`, `bio`, `roles`, `dept_id`, `dept_tree_path`, `status`, `login_time`, `login_ip`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (2, 0, '0,', 'admin', '$2a$10$ZyuH1.NqXInhHxUkH003SuU9dRPqoar8/dnvaElBVN6xnJ/eKAPzq', '/avatars/2025-11-17/1763351317002-logo.png', '管理员', 1, 'admin@admin.com', '18866666666', '我是一个管理员', 'admin', 2, '0,1,', 1, 1763543476001, '127.0.0.1', NULL, 1759184204270, 1, 1763432735006, 0);
INSERT INTO `sys_user` (`id`, `pid`, `tree_path`, `username`, `password`, `avatar`, `nickname`, `gender`, `email`, `phone`, `bio`, `roles`, `dept_id`, `dept_tree_path`, `status`, `login_time`, `login_ip`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (3, 2, '0,2,', 'zhangsan', '$2a$10$8qbsDf2OcIe4Yx20.ZTIw.m5ZzCo4.t4sX79fXBzqmhTEPCXhSg1u', NULL, '张三', 0, 'zhangsan@admin.com', '18813131414', NULL, 'user', 3, '0,1,2,', 1, NULL, NULL, 3, 1759184885229, 1, 1763450702006, 0);
INSERT INTO `sys_user` (`id`, `pid`, `tree_path`, `username`, `password`, `avatar`, `nickname`, `gender`, `email`, `phone`, `bio`, `roles`, `dept_id`, `dept_tree_path`, `status`, `login_time`, `login_ip`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (5, NULL, NULL, 'lisi', '$2a$10$wfNsVK3hWX/VizeJK18.Be0XX4ahIQY8FJMYJhO19yYSSiO2OplNq', NULL, '李四', 0, 'lisi@admin.com', '18813131212', NULL, 'user', 3, '0,1,2,', 1, NULL, NULL, NULL, 1763113966000, 1, 1763432750005, 0);
COMMIT;

-- ----------------------------
-- Table structure for tb_demo
-- ----------------------------
DROP TABLE IF EXISTS `tb_demo`;
CREATE TABLE `tb_demo` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `a` varchar(255) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  `c` double DEFAULT NULL,
  `d` bigint(20) DEFAULT NULL,
  `create_by` bigint(20) DEFAULT NULL,
  `create_time` bigint(20) DEFAULT NULL,
  `update_by` bigint(20) DEFAULT NULL,
  `update_time` bigint(20) DEFAULT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `e` json DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of tb_demo
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
